home *** CD-ROM | disk | FTP | other *** search
- /*________________________________________________________
-
- File: Confidential.h
-
- Header file for a printing extension that stamps a
- message on each page spooled.
-
- Dave Hersey
- Apple Developer Technical Support
-
- 2/01/93 - dmh - Completely rewrote for the a5 seed.
- 4/26/93 - dmh - Renamed files for b1 seed.
- 4/27/93 - dmh - Updated NewSpoolPage override to work
- w/o CopyDeepToShape.
- 9/05/93 - dmh - Updated for b2.
- - removed work-around for a 1.0a5
- panel bug. That should have been
- removed in the b1 version… oops.
- - Fixed minor bug with panel's editText
- fields' highlighting.
- - Switched to Exception.h assertion stuff
- for error checking.
- 12/18/93 - dmh - Updated for b3.
- 3/22/94 - dmh - Updated for b4.
-
- (Note: there are labels in the Mark menu.)
-
- __________________________________________________________*/
-
- #include <Types.h>
- #include <Errors.h>
- #include <Resources.h>
- #include <Packages.h>
- #include <ToolUtils.h>
-
- #pragma pointers_in_D0
- #include <GXExceptions.h>
- #include <GXMessages.h>
- #include <GXPrinterDrivers.h>
- #include <GXPrinting.h>
- #include <GXGraphics.h>
- #include <GXMath.h>
-
-
- #define kCreator 'CON!' /* Our app's creator type. */
- #define kStampCollectionType kCreator /* The only collection type we use. */
-
- #define r_str 200 /* ID of STR# resource. */
- #define r_defaultStrIdx 1 /* index of default text string. */
- #define r_defaultFSizeIdx 2 /* index of default font size string. */
-
- #define r_stampPanel 2000 /* Our panel ID. */
- #define d_message 5 /* DITL item for our message field. */
- #define d_fontSize 7 /* DITL item for our font size field. */
-
-
- // This is what our stamp information collection looks like. Remember: the
- // offsets for the fields below must match those in the xdtl resource exactly.
-
- typedef struct StampCollection
- { // offset:
- unsigned char stampEnabled; // 0 stamp is on/off.
- char fillByte; // unused. C requires for alignment.
- long fontSize; // 2 font size to use.
- Str63 message; // 6 message to print.
- } StampCollection;
-
-
- // Prototypes follow
-
- OSErr NewJobPrintDialog(gxDialogResult *dlogResult);
- OSErr NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
- OSErr NewSpoolPage(gxSpoolFile spFile, gxFormat aFormat, gxShape originalPage);
- OSErr AddStampToPage(StampCollection *stampConfig, gxShape pgShape, gxFormat aFormat);
- OSErr SetUpPrintPanel(void);
- OSErr GetDefaultSettings(StampCollection *stampConfig);
- OSErr GetStamp(StampCollection *stampConfig);
- OSErr GetJobCollectionItem(void *collectItem, long *collectSize,
- OSType collectType, short collectID);
-